home *** CD-ROM | disk | FTP | other *** search
- setpoint "Set a point." 1 'Allows user to set a point
- pointval x1 y1 1 'and immediatly store it
- j=0 'initialize a counter
- sys(132)=0 'X placement of text window
- sys(133)=0 'Y placement of text window
- window 1,60 'size of window::::height,width
- locate 1, 5 'loaction of text in window
- print "Would you like to fit drawing to window after each segment?" 'text in window
- anykey b$ 'store user fitting response in b
- wclose 'closes window
- DOOVER: 'goto here
- sys(132)=0 'X placement of text window
- sys(133)=0 'Y placement of text window
- window 1,50 'size of window::::height,width
- locate 1, 5 'loaction of text in window
- print "Enter the dirction as U, D, L, or R or Q to quit." 'text in window
- anykey a$ 'store user directional response in a
- wclose 'closes window
- if a$ = "Q" then 'if quitting do following
- sys(132)=0 'X placement of text window
- sys(133)=0 'Y placement of text window
- window 1,60 'size of window::::height,width
- locate 1, 5 'loaction of text in window
- print "Would you like to keep current drawing selected?" 'text in window
- anykey c$ 'store user selection response in c
- wclose 'closes window
- maxx=sys(122) 'retrieves largest x in drawing and stores in maxx
- if c$ = "N" then 'if the object is not to stay selected do following
- 'selection of point not in drawing
- 'find largest x and add 5 so as to escape drawing
- >pointselect
- {
- <type 0
- <pointxyz [maxx+5,y1]
- }
- endif 'ends selection if
- END 'exits program
- endif 'ends quitting if
- sys(130)=-10 'X placement of input box
- sys(131)=-10 'Y placement of input box
- input "Enter the Distance." dist 'allows user input into dist
- if (a$ = "U") then 'if direction response up do following
- 'draw line staring at current x,y going
- 'user defined distance in upward direction
- >Line
- {
- <pointxyz [x1,y1]
- <pointpolar [dist,90]
- }
- y1=y1+dist 'set y to new y value
- end if 'ends upward if
- if (a$ = "D") then 'if direction response down do following
- 'draw line staring at current x,y going
- 'user defined distance in downward direction
-
- >Line
- {
- <pointxyz [x1,y1]
- <pointpolar [dist,270]
- y1=y1-dist 'set y to new y value
- }
- end if 'ends downward if
- if (a$ = "L") then 'if direction response left do following
- 'draw line staring at current x,y going
- 'user defined distance in leftward direction
-
- >Line
- {
- <pointxyz [x1,y1]
- <pointpolar [dist,180]
- }
- x1=x1-dist 'set x to new x value
- end if 'ends leftward if
- if (a$ = "R") then 'if direction response right do following
- 'draw line staring at current x,y going
- 'user defined distance in rightward direction
-
- >Line
- {
- <pointxyz [x1,y1]
- <pointpolar [dist,0]
- }
- x1=x1+dist 'set x to new x value
- end if 'ends rightward if
- j=j+1 'increment j counter
- currentx=x1 'stores x value in current
- currenty=y1 'stores y value in current
- 'selects current entity
- >PointSelect
- {
- <type 1
- <pointxyz [currentx,currenty]
- }
- if j>1 then 'if there is only one line they can't be combined
- 'combines all selected lines
- >Combine
- {
- }
- endif 'ends combine if
- if b$="Y" then 'if user wants drawing fit each time do following
- 'fits drawing to current window
- >FitToWindow
- {
- }
- 'reselects object fit to window deselected
- >PointSelect
- {
- <type 0
- <pointxyz [x1,y1]
- }
- endif 'ends window fitting if
- goto DOOVER 'loops program till user enters Q to quit